# -*- mode: org; -*-
#+TITLE: Dets Usage
#+AUTHOR: Zelphir Kaltstahl
#+EMAIL: zelphirkaltstahl@posteo.de
#+STARTUP: content indent align inlineimages hideblocks entitiesplain nologdone nologreschedule nologredeadline nologrefile
#+TODO: TODO WIP DEPRECATED | DONE
#+DATE: <2021-06-21 Mon>
#+KEYWORDS: erlang dets usage guide
#+LANGUAGE: English
#+PRIORITIES: A E E
#+EXCLUDE_TAGS: noexport
#+OPTIONS: ^:{}
#+OPTIONS: H:10
#+OPTIONS: toc:2
#+OPTIONS: tags:nil
#+OPTIONS: tasks:t
#+OPTIONS: H:6
#+OPTIONS: p:nil
#+OPTIONS: pri:nil
#+OPTIONS: prop:nil
#+OPTIONS: todo:t
#+OPTIONS: stat:nil
#+OPTIONS: |:t
#+OPTIONS: inline:nil
#+OPTIONS: date:t

* Dets

Dets is a small database, which stores to a file, suitable for small data (< 2GB).

* Open file

#+begin_src erlang
dets:open_file(<FILE_NAME>, [{keypos, <TABLE_KEY>}, {type, <TABLE_TYPE>}]).
#+end_src

* Insert a record

#+begin_src erlang
dets:insert(<FILE_NAME>, <RECORD>).
#+end_src

* Looking up records

#+begin_src erlang
dets:insert(<FILE_NAME>, <TABLE_KEY_VALUE>).
#+end_src

* Close file

#+begin_src erlang
dets:close(<FILE_NAME>).
#+end_src

* local variable definitions                                       :noexport:

# Local Variables:
# fill-column: 80
# org-babel-noweb-wrap-start: "<<"
# org-babel-noweb-wrap-end: ">>"
# org-confirm-babel-evaluate: nil
# End:
